Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force response body update #540

Closed

Conversation

JackKelly-Bellroy
Copy link
Contributor

Fixes #538

Draft for now, but keen for comments: do you prefer strict lets? seq? Bang patterns?

We will test this internally before recommending that it gets merged.

`Network.HTTP.Client.Response.getResponse` stores the original request
inside a `Response`, but attempts to override its request body with an
empty one. This record update was lazy, and a reference to the
original request body would persist, causing a space leak.

Force the response to WHNF, and use bang patterns to force the Request
and ultimately its body to WHNF too.
@JackKelly-Bellroy JackKelly-Bellroy force-pushed the force-response-body-update branch from dee2a38 to 0f91cae Compare July 5, 2024 03:43
@snoyberg
Copy link
Owner

snoyberg commented Jul 7, 2024

Either approach is fine with me.

@JackKelly-Bellroy
Copy link
Contributor Author

We could never prove an improvement in space usage with this PR, so I'm going to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http-conduit: Requests may be retained in Responses
3 participants